package com.eduagent.xwqeduagent.api.DocumentTranslation.api;

import com.eduagent.xwqeduagent.api.DocumentTranslation.model.DocumentInfo;
import com.eduagent.xwqeduagent.api.DocumentTranslation.model.DocumentTranslationResponse;

import java.io.File;

/**
 * Document translation API interface
 */
public interface DocumentTranslationApi {

    /**
     * Upload and translate a file
     *
     * @param from Source language code
     * @param to Target language code
     * @param file File to translate
     * @param realmCode Domain code (optional)
     * @param termId Term dictionary ID (optional)
     * @param memoryId Translation memory ID (optional)
     * @param processingMode Processing mode for PDF files (optional)
     * @return Document translation response with fileNo
     */
    DocumentTranslationResponse uploadAndTranslate(String from, String to, File file, Integer realmCode,
                                                  String termId, String memoryId, Integer processingMode);

    /**
     * Get document information and translation status
     *
     * @param fileNo File number
     * @return Document information
     */
    DocumentInfo getDocumentInfo(String fileNo);

    /**
     * Interrupt/terminate a translation
     *
     * @param fileNo File number
     * @return True if terminated successfully, false otherwise
     */
    boolean interruptTranslation(String fileNo);

    /**
     * Download translated file
     *
     * @param fileNo File number
     * @param type Download type (0: source, 1: translation, 2: bilingual, etc.)
     * @param savePath Path to save the downloaded file
     * @return True if download is successful, false otherwise
     */
    boolean downloadFile(String fileNo, Integer type, String savePath);

    /**
     * Get download URL for translated file
     *
     * @param fileNo File number
     * @param type Download type (0: source, 1: translation, 2: bilingual, etc.)
     * @return Download URL
     */
    String getDownloadUrl(String fileNo, Integer type);

    /**
     * Delete a file
     *
     * @param fileNo File number
     * @return True if deleted successfully, false otherwise
     */
    boolean deleteFile(String fileNo);
} 